<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
<%@ page import="com.todofun.web.filter.*"%>
<%
String actionName = request.getParameter("actionName");
String errorMsg = "";
if("dologin".equals(actionName)) {
	String userName = request.getParameter("userName");
	String userPwd = request.getParameter("passwd");
	
	boolean checked = LoginChecker.checkPasswd(userName,userPwd);
	if(checked) { 
		request.getSession().setAttribute(AuthFilter.SESSON_USER ,userName);
		request.getRequestDispatcher("/publishInfo.do?m=admin").forward(request,response);
		return;
	}else{
		errorMsg = "用户名/密码不正确.";
	}
}
%>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>后台登录页</title>
</style>
<style type="text/css">
@import url("css/common.css");
</style>
<script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div class="div" id="all">
  <div class="all" id="allTopDiv">
   <!-- <iframe src="common/top.jsp" height="130px" width="100%" frameborder="0" scrolling="no"  ></iframe>-->

<%@include file="WEB-INF/jsps/common/top.jsp"%>
  </div>
  <div class="all" id="allmain">
    <div class="allmain" id="allmainDivTop" >
      <div class="all" id="allmainDivTopClose"> </div>
      <div class="allmainDivTop" id="allmainDivTopDiv"><%@include file="WEB-INF/jsps/common/bar.jsp"%></div>
    </div>
    <div class="allmain" id="allmainLeft">
      <div id="TabbedPanels1" class="TabbedPanels">
        <ul class="TabbedPanelsTabGroup">
          <li class="TabbedPanelsTab" tabindex="0">后台用户登录</li>
        </ul>
		
        
        <div class="TabbedPanelsContentGroup">
          <div class="TabbedPanelsContent">
			 <form action="login.jsp">
			 	<input type="hidden" name="actionName" value="dologin"/>
				用户名:<input type="text" name="userName" />&nbsp;<%=errorMsg%><br/>
				密&nbsp;&nbsp;码:<input type="password" name="passwd"/><br/>
				<input type="submit" value="登录"/>
			</form>
		  </div>
          
		  
       	</div>
       
      </div>
    </div>
    <div class="allmain" id="allmainRight">
      <%@include file="WEB-INF/jsps/common/right.jsp"%>
    </div>
  </div>
  <div class="all" id="allfooter">
    <%@include file="WEB-INF/jsps/common/footer.jsp"%>
  </div>
</div>
<script type="text/javascript">
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
</script>
</body>
</html>
